package com.xxxx.car.appointment.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxxx.car.appointment.domain.ServiceItem;
import com.xxxx.car.appointment.domain.Statement;
import com.xxxx.car.appointment.domain.StatementItem;
import com.xxxx.car.appointment.vo.StatementVo;

/**
 * 结算单Service接口
 * 
 * @author Huang
 * @date 2024-08-28
 */
public interface IStatementService extends IService<Statement>
{
    /**
     * 查询结算单
     * 
     * @param id 结算单主键
     * @return 结算单
     */
    public Statement selectStatementById(Long id);

    /**
     * 查询结算单列表
     * 
     * @param statement 结算单
     * @return 结算单集合
     */
    public List<Statement> selectStatementList(Statement statement);

    /**
     * 结算单生成创建
     *
     * @param statementVo 结算单
     * @return 结果
     */
    public int insertStatement(StatementVo statementVo,Long appointmentId);

    public int insertStatement(StatementVo statementVo);

    /**
     * 修改结算单
     * 
     * @param statementVo 结算单
     * @return 结果
     */
    public int updateStatement(StatementVo statementVo);

    /**
     * 批量删除结算单
     * 
     * @param ids 需要删除的结算单主键集合
     * @return 结果
     */
    public int deleteStatementByIds(Long[] ids);

    /**
     * 删除结算单信息
     * 
     * @param id 结算单主键
     * @return 结果
     */
    public int deleteStatementById(Long id);

    int insertStatementItemList(StatementVo statementVo);

    List<StatementItem> selectItemsById(Long statementId);

    int dePrepay(Long id);

    // 基于预约id查询结算单
    Statement selectStatementByAppointmentId(Long id);
}
